import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import api from './http/request'
import global from '@/utils/global'

const app = createApp(App);
app.use(store).use(router).use(ElementPlus)

//把api为app的全局属性, app的全局属性名$api
app.config.globalProperties.$api=api;
app.config.globalProperties.global = global

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
    app.component(key, component)
  }

app.mount('#app')
